<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>双向绑定</title>
	</head>
	<body>
		<script src="./js/vue.js"></script>
		<div id="app">
			<p>{{msg}}</p>
			<cpn></cpn>
			<button @click="btnClick">click</button>
		</div>
		
		<template id="cpnT">
			<div>子组件内容</div>
		</template>
		
		<script>
		const cpn = {
			template:`#cpnT`,\,
		}
		let app = new Vue({
			el:"#app",
			data:{
				msg:'hello world'
			},
			components:{
				cpn
			},
			methods:{
				changeTotal(value){
					this.counter = value
				}
			}
		})
		</script>
	</body>
</html>